//
//  DataCenter.h
//  LCExpress
//
//  Created by mac1 on 15/10/13.
//  Copyright © 2015年 D0. All rights reserved.
//
#import "AFNetworking.h"
#import "MJExtension.h"
#import "MyFMDB.h"
//#import "CellTransport.h"

#import "ModOrderRoot.h"
#import "ModOrderDetail.h"
#import "ModODFrom.h"
#import "ModODFLocation.h"
#import "ModODGoods.h"
#import "ModODTo.h"
#import "ModODTLocation.h"

#import "ModLoginRoot.h"
#import "ModLoginInfo.h"
#import "ModEmployee.h"
#import "ModSMSVerifi.h"

#import <Foundation/Foundation.h>

typedef void (^block)( id  data) ;

@interface DataCenter : NSObject

//本类初始化函数
-(DataCenter*)initData;

+(DataCenter*)Create;


//获取订单详情的接口
@property (nonatomic, strong)NSMutableArray * arrModOD;

@property (nonatomic, strong)ModOrderRoot * modOrderRoot ;

@property (nonatomic, strong)ModOrderDetail * modOrderDetail ;

@property (nonatomic, strong)ModODFrom * modODFrom;

@property (nonatomic, strong)ModODFLocation * modODFLocation;

@property (nonatomic, strong)ModODGoods * modODGoods;

@property (nonatomic, strong)ModODTo * modODTo;

@property (nonatomic, strong)ModODTLocation * modODTLocation;

@property (nonatomic, copy) void (^dataIsReady)();
-(void)setDataIsReady:(void (^)())dataIsReady;

-( void )getOrderDetail;


//登陆接口
@property (nonatomic, strong) ModLoginRoot * modLoginRoot;

@property (nonatomic, strong) ModLoginInfo * modLoginInfo;

@property (nonatomic, strong) ModEmployee * modEmployee;

-(void)loginWithAccount:(NSString*)account withPassword:(NSString*)password;

@property (nonatomic, copy) void (^loginSuccess)();
-(void)setLoginSuccess:(void (^)())loginSuccess;

@property (nonatomic, copy) void (^loginError)(NSString* msg);
-(void)setLoginError:(void (^)(NSString * msg))loginError;


//短信接口
@property (nonatomic, strong) ModSMSVerifi * modSMSVerifi;

-(void)getSMSCodeWithPhoneNumber:(NSString*)phoneNumber;

-(void)verifySMSCodeWithPhoneNumber:(NSString*)phoneNumber withSMSNumber:(NSString*)SMSNumber;

@property (nonatomic, copy) void (^verifySuccess)();
-(void)setVerifySuccess:(void (^)())verifySuccess;

@property (nonatomic, copy) void (^verifyFailure)(NSString*);
-(void)setVerifyFailure:(void (^)(NSString*))verifyFailure;


//token获取订单详情的接口
-(void)loginWithToken:(NSString*)token withUserId:(NSString*)userId withDeviceId:(NSString*)deviceId;

@property (nonatomic, strong) void (^employeeSuccess)(NSString*);
-(void)setEmployeeSuccess:(void (^)(NSString *))employeeSuccess;

@end
